<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@page import="java.sql.*"%>
<%@ page import="elibrary.DaoConnection" %>
<%@ page language="java" import="java.util.*"%>
<%@ include file="config.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>My-Library | Add Books</title>
        <meta name="keywords" content="My Library" />
        <meta name="description" content="Library" />
        <link href="css/style.css" rel="stylesheet" type="text/css" />
        <link href="css/jquery.ennui.contentslider.css" rel="stylesheet" type="text/css" media="screen,projection" />
        <script language="javascript" type="text/javascript">


            //Function to clear the contents of field on by clicking on the field


            function clearText(field)
            {
                if (field.defaultValue == field.value) field.value = '';
                else if (field.value == '') field.value = field.defaultValue;
            }
        </script>
    </head>
    <body>
        <%

        //connection is made to the database


        Connection con=DaoConnection.getcon(connectURL, DBuser, DBpass);
        Statement st=con.createStatement();
        ResultSet rs=st.executeQuery("SELECT * FROM USERS");
        rs.next();


        %>

        <div id="templatemo_header_wrapper">

            <div id="templatemo_header">

                <div id="site_logo"><img src="images/logo.jpeg" width="100" height="100"/></div><div align="left"><img src="images/header.png"/></div>
            </div> <!-- end of header -->
        </div> <!-- end of header wrapper -->

        <div id="templatemo_menu_wrapper">

            <div id="templatemo_menu">
                <ul>
                    <li><a href="#" class="current">Home</a></li>
                    <li><a href="#">Web Design</a></li>
                    <li><a href="http://www.templatemo.com" target="_parent">Templates</a></li>
                    <li><a href="#">About</a></li>
                    <li><a href="#" class="last">Contact Us</a></li>
                </ul>
            </div> <!-- end of menu -->
        </div> <!-- end of menu wrapper -->

        <div id="tempatemo_content_wrapper">

            <div id="templatemo_content">

                <div id="content_panel">

                    <div id="column_w610" >

                        <div class="header_01" align="left">
                            <p><i>
           	      Welcome .........,</i>  </p>
                        </div>
                        <div class="header_05" align="left">
                            <u>Users Details</u>
                        </div>
                        <br/>
                        <div class="section_01">
                            <table>
                                <tr>
                                    <td align="left"> User Id </td>
                                    <td>:</td>
                                    <td> <input type="text" value="<%=rs.getInt(1)%>" name="userid" size="25" /></td>
                                </tr>
                                <tr>
                                    <td align="left"> User Name </td>
                                    <td>:</td>
                                    <td> <input type="text" name="username" value="<%=rs.getString(2)%>"size="25" /></td>
                                </tr>
                                <tr>
                                    <td align="left"> Password </td>
                                    <td>:</td>
                                    <td> <input type="text" name="password" value="<%=rs.getString(3)%>" size="25" /></td>
                                </tr>
                                <tr>
                                    <td align="left"> First Name </td>
                                    <td>:</td>
                                    <td> <input type="text" name="firstname" value="<%=rs.getString(4)%>" size="25" /></td>
                                </tr>
                                <tr>
                                    <td align="left"> Last Name </td>
                                    <td>:</td>
                                    <td> <input type="text" name="lastname" value="<%=rs.getString(5)%>" size="25" /></td>
                                </tr>
                                <tr>
                                    <td align="left"> Email Id </td>
                                    <td>:</td>
                                    <td> <input type="text" name="emailid" value="<%=rs.getString(6)%>" size="25" /></td>
                                </tr>
                                <tr>
                                    <td align="left"> Contact No. </td>
                                    <td>:</td>
                                    <td> <input type="text" name="contactno" value="<%=rs.getString(10)%>" size="25" /></td>
                                </tr>
                                <tr>
                                    <td align="left"> Address </td>
                                    <td>:</td>
                                    <td> <input type="text" name="address" value="<%=rs.getString(9)%>" size="25" /></td>
                                </tr>
                                <tr>
                                    <td align="left"> Security Question </td>
                                    <td>:</td>
                                    <td> <input type="text" name="securityquestion" value="<%=rs.getString(7)%>" size="25" /></td>
                                </tr>
                                <tr>
                                    <td align="left"> Answer </td>
                                    <td>:</td>
                                    <td> <input type="text" name=answer value="<%=rs.getString(8)%>" size="25" /></td>
                                </tr>
                                <tr>
                                    <td align="left"> Permission </td>
                                    <td>:</td>
                                    <td> <input type="text" name="permission" value="<%=rs.getString(13)%>"  size="25" /></td>
                                </tr>

                            </table>


                        </div>

                        <ul class="list_with_icon">

                            <li>Last Login : <%=rs.getString(11)%></li>
                        </ul>
                    </div> <!-- end of column w610 -->

                    <div id="column_w290">

                        <div class="header_02">Choose from here </div>

                        <div class="choose_options">
                            <div class="opt_hand"><img src="images/hand.gif" height="35" width="50"/> </div>
                            <div class="opt_content">
                                <div class="header_05" align="left">
                                    <p><a href="#">Users Details</a></p>
                                </div>
                            </div>

                            <div class="cleaner"></div>
                        </div>

                        <div class="choose_options">
                            <div class="opt_hand"><img src="images/hand.gif" height="35" width="50"/> </div>
                            <div class="opt_content">
                                <div class="header_05" align="left"><a href="#">View Requests</a></div>
                            </div>

                            <div class="cleaner"></div>
                        </div>

                        <div class="choose_options">
                            <div class="opt_hand"><img src="images/hand.gif" height="35" width="50"/>                        </div>
                            <div class="opt_content">
                                <div class="header_05" align="left"><a href="#">Browse Books</a></div>
                            </div>

                            <div class="cleaner"></div>
                        </div>

                        <div class="choose_options">
                            <div class="opt_hand"><img src="images/hand.gif" height="35" width="50"/>                        </div>
                            <div class="opt_content">
                                <div class="header_05" align="left"><a href="#">Add New Books</a></div>
                            </div>


                            <div class="cleaner"></div>
                        </div>
                        <div class="choose_options">
                            <div class="opt_hand"><img src="images/hand.gif" height="35" width="50"/>                        </div>
                            <div class="opt_content">
                                <div class="header_05" align="left"><a href="#">Delayed Notifications</a></div>
                            </div>

                            <div class="cleaner"></div>
                        </div>
                    </div> <!-- end of column 290 -->

                    <div class="cleaner"></div>
                </div> <!-- end of content panel -->

                <div class="cleaner"></div>
            </div> <!-- end of content -->
        </div> <!-- end of content wrapper -->

        <div id="templatemo_footer_wrapper">

            <div id="templatemo_footer">

                <center>Copyright &#169; 2010 MyLibrary &nbsp &nbsp | &nbsp &nbsp <a href="termsandconditions.jsp"><font color="#828c96"> Terms and Conditions</font></a> </center><br></br>
                <center><b>Disclaimer:</b> No Part of this site can be copied or reproduced in any form, excepting for personal information, without the written permission of the owners.</center>
            </div> <!-- end of footer -->
        </div> <!-- end of footer -->
    </body>
</html>

